package com.ruoyi.web.domain;

import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 微信支付退款对象 wx_pay_refund
 * 
 * @author ruoyi
 * @date 2024-12-19
 */
public class WxPayRefund extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 商户退款单号 */
    @Excel(name = "商户退款单号")
    @NotBlank(message = "商户退款单号不能为空")
    @Size(max = 64, message = "商户退款单号不能超过64个字符")
    private String outRefundNo;

    /** 微信退款单号 */
    @Excel(name = "微信退款单号")
    @Size(max = 64, message = "微信退款单号不能超过64个字符")
    private String refundId;

    /** 原商户订单号 */
    @Excel(name = "原商户订单号")
    @NotBlank(message = "原商户订单号不能为空")
    @Size(max = 64, message = "原商户订单号不能超过64个字符")
    private String outTradeNo;

    /** 原微信支付订单号 */
    @Excel(name = "原微信支付订单号")
    @Size(max = 64, message = "原微信支付订单号不能超过64个字符")
    private String transactionId;

    /** 关联订单ID */
    @Excel(name = "关联订单ID")
    @NotNull(message = "关联订单ID不能为空")
    private Long orderId;

    /** 用户openid */
    @Excel(name = "用户openid")
    @NotBlank(message = "用户openid不能为空")
    @Size(max = 128, message = "用户openid不能超过128个字符")
    private String openid;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 退款金额（分） */
    @Excel(name = "退款金额", suffix = "分")
    @NotNull(message = "退款金额不能为空")
    private Integer refundAmount;

    /** 原订单金额（分） */
    @Excel(name = "原订单金额", suffix = "分")
    @NotNull(message = "原订单金额不能为空")
    private Integer totalAmount;

    /** 货币类型 */
    @Excel(name = "货币类型")
    private String currency;

    /** 退款原因 */
    @Excel(name = "退款原因")
    @Size(max = 255, message = "退款原因不能超过255个字符")
    private String reason;

    /** 退款状态 */
    @Excel(name = "退款状态")
    private String refundStatus;

    /** 退款入账账户 */
    @Excel(name = "退款入账账户")
    private String refundRecvAccount;

    /** 退款成功时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "退款成功时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date successTime;

    /** 删除标志 */
    private String delFlag;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setOutRefundNo(String outRefundNo) 
    {
        this.outRefundNo = outRefundNo;
    }

    public String getOutRefundNo() 
    {
        return outRefundNo;
    }

    public void setRefundId(String refundId) 
    {
        this.refundId = refundId;
    }

    public String getRefundId() 
    {
        return refundId;
    }

    public void setOutTradeNo(String outTradeNo) 
    {
        this.outTradeNo = outTradeNo;
    }

    public String getOutTradeNo() 
    {
        return outTradeNo;
    }

    public void setTransactionId(String transactionId) 
    {
        this.transactionId = transactionId;
    }

    public String getTransactionId() 
    {
        return transactionId;
    }

    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }

    public void setOpenid(String openid) 
    {
        this.openid = openid;
    }

    public String getOpenid() 
    {
        return openid;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setRefundAmount(Integer refundAmount) 
    {
        this.refundAmount = refundAmount;
    }

    public Integer getRefundAmount() 
    {
        return refundAmount;
    }

    public void setTotalAmount(Integer totalAmount) 
    {
        this.totalAmount = totalAmount;
    }

    public Integer getTotalAmount() 
    {
        return totalAmount;
    }

    public void setCurrency(String currency) 
    {
        this.currency = currency;
    }

    public String getCurrency() 
    {
        return currency;
    }

    public void setReason(String reason) 
    {
        this.reason = reason;
    }

    public String getReason() 
    {
        return reason;
    }

    public void setRefundStatus(String refundStatus) 
    {
        this.refundStatus = refundStatus;
    }

    public String getRefundStatus() 
    {
        return refundStatus;
    }

    public void setRefundRecvAccount(String refundRecvAccount) 
    {
        this.refundRecvAccount = refundRecvAccount;
    }

    public String getRefundRecvAccount() 
    {
        return refundRecvAccount;
    }

    public void setSuccessTime(Date successTime) 
    {
        this.successTime = successTime;
    }

    public Date getSuccessTime() 
    {
        return successTime;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("outRefundNo", getOutRefundNo())
            .append("refundId", getRefundId())
            .append("outTradeNo", getOutTradeNo())
            .append("transactionId", getTransactionId())
            .append("orderId", getOrderId())
            .append("openid", getOpenid())
            .append("userId", getUserId())
            .append("refundAmount", getRefundAmount())
            .append("totalAmount", getTotalAmount())
            .append("currency", getCurrency())
            .append("reason", getReason())
            .append("refundStatus", getRefundStatus())
            .append("refundRecvAccount", getRefundRecvAccount())
            .append("successTime", getSuccessTime())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
